package com.example.wangda.smartparking;

import android.app.Activity;
import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.view.Window;
import android.widget.Button;
import android.widget.Toast;

public class LoginActivity extends Activity {

    private Button login_btn;
    private Button regist_btn;
    private Button simula_btn;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        /*去除标题栏*/
        requestWindowFeature(Window.FEATURE_NO_TITLE);
        setContentView(R.layout.activity_login);

        login_btn = (Button)findViewById(R.id.loginButton);
        regist_btn = (Button)findViewById(R.id.regisButton);
        simula_btn = (Button)findViewById(R.id.btn_simula);

        login_btn.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                Intent intent = new Intent(LoginActivity.this, ParkingAvtivity.class);
                startActivity(intent);
            }
        });

        regist_btn.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                Toast.makeText(LoginActivity.this, "暂时不开放注册！", Toast.LENGTH_SHORT).show();
            }
        });

        simula_btn.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent = new Intent(LoginActivity.this, SimulaActivity.class);
                startActivity(intent);
            }
        });
    }
}
